package myArrayList;

public class Test {
    public static void main1(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.addLast(1);
        myArrayList.addLast(2);
        myArrayList.addLast(3);
        myArrayList.addLast(4);
        myArrayList.display();
        System.out.println("*******************");
        myArrayList.add(1,9999);
        myArrayList.display();
        System.out.println("*******************");
        System.out.println(myArrayList.contains(9999));
        System.out.println(myArrayList.indexOf(9999));
        System.out.println(myArrayList.get(1));
        System.out.println("*******************");
        System.out.println(myArrayList.remove(9999));
        myArrayList.display();
        System.out.println("*******************");
        System.out.println( myArrayList.remove1(1));
        myArrayList.display();
    }

    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.addFirst(34);
        myArrayList.addFirst(23);
        myArrayList.addFirst(12);
        myArrayList.display();
        myArrayList.addLast(45);
        myArrayList.addLast(56);
        myArrayList.display();
        myArrayList.removeFirst();
        myArrayList.display();
        myArrayList.removeLast();
        myArrayList.display();
    }
}
